﻿<Application x:Class="Berico.SnagL.UI.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
             xmlns:cmd="clr-namespace:GalaSoft.MvvmLight.Command;assembly=GalaSoft.MvvmLight.Extras.SL4"             
             xmlns:converters="clr-namespace:Berico.Common.UI.Converters;assembly=Berico.Common"  
             xmlns:ui="clr-namespace:Berico.SnagL.UI"
             mc:Ignorable="d">
    
    <Application.Resources>
        
        <!--Global View Model Locator-->
        <ui:ViewModelLocator x:Key="Locator" d:IsDataSource="True" />
        
        <!-- DataTemplateValueConverter is used by the Graph view to determine
             which data template should be used based on the bound objects type -->
        <converters:DataTemplateValueConverter x:Key="DataTemplateConverter" />
        
        <!-- DataTemplate for icon nodes -->
        <DataTemplate x:Key="IconNodeViewModel.DataTemplate">
            <ui:IconNode CacheMode="BitmapCache" Height="{Binding Height}" Width="{Binding Width}" Canvas.ZIndex="{Binding ZIndex}" Canvas.Top="{Binding Position.Y, Mode=TwoWay}" Canvas.Left="{Binding Position.X, Mode=TwoWay}" />
        </DataTemplate>
        
        <!-- DataTemplate for text nodes -->
        <DataTemplate x:Key="TextNodeViewModel.DataTemplate">
            <ui:TextNode Height="{Binding Height}" Width="{Binding Width}" Canvas.ZIndex="{Binding ZIndex}" Canvas.Top="{Binding Position.Y, Mode=TwoWay}" Canvas.Left="{Binding Position.X, Mode=TwoWay}" />
        </DataTemplate>
        
        <Image x:Key="FilterImage" Source="/Berico.SnagL;component/Resources/Icons/SnagL/Filter.png" />
        <Image x:Key="SearchImage" Source="/Berico.SnagL;component/Resources/Icons/SnagL/Search.png" />        
        
        <!-- DataTemplate for edges -->
        <!--<DataTemplate x:Key="EdgeViewModelBase.DataTemplate">
            <internal:Edge Canvas.ZIndex="1" />
        </DataTemplate>-->
        
    </Application.Resources>
    
</Application>
